---
title: Select
description: Displays a list of options for the user to pick from.
shadcnDocsLink: https://ui.shadcn.com/docs/components/select
---

<ComponentPreview component="select">
  ```tsx file=<rootDir>/src/examples/ui/select/index.tsx
  ```
</ComponentPreview>

## Installation

<Installation component="select">
  ```tsx file=<rootDir>/src/components/ui/select.tsx
  ```
</Installation>

## Usage

```ts
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectLabel,
  SelectTrigger,
  SelectValue,
} from '@/components/ui/select'
```

```tsx
<Select>
  <SelectTrigger className="w-[180px]">
    <SelectValue placeholder="Select a fruit" />
  </SelectTrigger>
  <SelectContent>
    <SelectGroup>
      <SelectLabel>Fruits</SelectLabel>
      <SelectItem value="apple">Apple</SelectItem>
      <SelectItem value="banana">Banana</SelectItem>
      <SelectItem value="blueberry">Blueberry</SelectItem>
      <SelectItem value="grapes">Grapes</SelectItem>
      <SelectItem value="pineapple">Pineapple</SelectItem>
    </SelectGroup>
  </SelectContent>
</Select>
```

## Examples

### Default

<ComponentPreview component="select" example="default">
  ```tsx file=<rootDir>/src/examples/ui/select/index.tsx
  ```
</ComponentPreview>

### Large List

<ComponentPreview component="select" example="large-list">
  ```tsx file=<rootDir>/src/examples/ui/select/large-list.tsx
  ```
</ComponentPreview>

### Disabled

<ComponentPreview component="select" example="disabled">
  ```tsx file=<rootDir>/src/examples/ui/select/disabled.tsx
  ```
</ComponentPreview>

### With Icon

<ComponentPreview component="select" example="with-icon">
  ```tsx file=<rootDir>/src/examples/ui/select/with-icon.tsx
  ```
</ComponentPreview>